Developer Documentation

QuickTime 4 API Documentation

3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents | Next |

Clipping Information

Draw regions contain information about the clipping state. A region may be in one of three states, encoded by the following enumeration:

typedef enum TQ3XClipMaskState {
    kQ3XClipMaskFullyExposed,
    kQ3XClipMaskPartiallyExposed,
    kQ3XClipMaskNotExposed
} TQ3XClipMaskState;

A fully exposed draw region has no overlapping windows; a partially exposed draw region has some overlapping windows; a not exposed draw region is entirely offscreen or completely covered by another window. You can determine the clipping state with the Q3XDrawRegion_GetClipFlags function.

If the clipping state is kQ3XClipMaskPartiallyExposed , you can use the Q3XDrawRegion_GetClipMask function to query the draw region for a bitmap that describes the clipping of the window. In the Mac OS environment, you can also use the Q3XDrawRegion_GetClipRegion routine to get information about clipping in the form of a handle to a QuickDraw region (a rgnHandle), or you can use the Q3XDrawRegion_GetGDHandle routine to return a GDHandle .

Q3XDrawRegion_GetClipFlags

The Q3XDrawRegion_GetClipFlags function lets you get the clipping state of a draw region.

TQ3Status Q3XDrawRegion_GetClipFlags(
                     TQ3XDrawRegion       drawRegion,
                     TQ3XClipMaskState    *clipMaskState);
drawRegion
A draw region.
clipMaskState
The draw region's clipping mask state.

DESCRIPTION

The Q3XDrawRegion_GetClipFlags function returns, in the clipMaskState parameter, one of three values that define the draw region's clipping mask state. The TQ3XClipMaskState values that can be returned are enumerated on [link] .

Q3XDrawRegion_GetClipMask

The Q3XDrawRegion_GetClipMask function lets you get a bitmap that describes the clipping state of a partially exposed draw region.

TQ3Status Q3XDrawRegion_GetClipMask(
                     TQ3XDrawRegion    drawRegion,
                     TQ3Bitmap         **clipMask);
drawRegion
A draw region.
clipMask
A bitmap that describes the clipping of the draw region's window.

DESCRIPTION

The Q3XDrawRegion_GetClipMask function returns, in the clipMask parameter, a bitmap that describes the clipping of the window for the partially exposed draw region drawRegion. In this bitmap, 1 bits indicate exposed pixels and 0 bits indicate occluded pixels.

On a Macintosh, additional window-system-specific information about clipping is available, in the form of a RgnHandle describing the clip region, or a GDHandle :

Q3XDrawRegion_GetClipRegion

The Q3XDrawRegion_GetClipRegion function lets you obtain a Mac OS RgnHandle value that describes the clip region of a partially exposed draw region.

TQ3Status Q3XDrawRegion_GetClipRegion(
                     TQ3XDrawRegion    drawRegion,
                     RgnHandle         *rgnHandle);
drawRegion
A draw region.
rgnHandle
A handle to a QuickDraw region.

DESCRIPTION

The Q3XDrawRegion_GetClipRegion function returns, in the rgnHandle parameter, a handle to a QuickDraw region that describes the clipping of the window for the partially exposed draw region drawRegion.

Q3XDrawRegion_GetGDHandle

The Q3XDrawRegion_GetGDHandle function lets you obtain a Mac OS GDHandle value that describes the clip region of a partially exposed draw region.

TQ3Status Q3XDrawRegion_GetGDHandle(
                     TQ3XDrawRegion    drawRegion,
                     GDHandle          *gdHandle);
drawRegion
A draw region.
gdHandle
A handle to a gDevice record.

DESCRIPTION

The Q3XDrawRegion_GetGDHandle function returns, in the gdHandle parameter, a handle to a gDevice record that describes the clipping of the window for the partially exposed draw region drawRegion. For further information about gDevice records, see Inside Macintosh: QuickDraw Objects.


© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents | Next |